package file;

import java.io.File;

public class DeleteFileDirDemo {
    public static void main(String[] args) {
        //    File f = new File("./a");
        // File f = new File("./test.txt");+
        File f = new File("./a");
        if (f.exists()) {
            f.delete();
            System.out.println("该文件或目录已经删除");
        } else {
            System.out.println("该文件或目录不存在");
        }
    }
}
